home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / dos_win / winsock / maillist / 94-03.Z / 94-03 / text0189.txt < prev    next >
Encoding:
Text File  |  1994-03-30  |  4.8 KB  |  131 lines

  1. We are having problems with our Qvtnet and/or Trumpet winsock.dll.  We have had relatively little trouble with it until
  2. we upgraded Qvtnet to version 3.97.  At that point we started seeing strange problems:
  3.  
  4.     1:  inability to ftp out without first updating the username field.  (Note: the contents of that field before, 
  5.         and after the change were "anonymous"
  6.  
  7.     2:  upon logging in (FTP) several copies of the opening messages are displayed, and upon logging out we get
  8.         several copies of the "connection lost" dialog box.
  9.  
  10.     3:  sometimes when using the autologin the process stalls waiting for the USER command.  We are unable to enter
  11.         it by hand until we do a status check.  At this point logging in by hand procedes normally.
  12.  
  13.     4:  autologin no longer works for MAIL.
  14.  
  15. All of this was weird, but it got weirder.  Assuming that 3.97 was just buggy, I reinstalled 3.96.  The problems remained.
  16. I reinstalled twsk10a.  The problems remained.  I am sure that I am missing something, but I don't know where it is.
  17.  
  18. Anyone have any ideas?
  19.  
  20. Thanks
  21.  
  22. Dennis Sutherland
  23. dsutherl@mcs.kent.edu
  24. Kent State University
  25. Computer Equipment Services
  26. From MarkW@ms70.nuwes.sea06.navy.mil Tue Mar 15 04:18:00 1994
  27. Received: from m65sun.nuwes.sea06.navy.mil by SunSITE.Unc.EDU (5.65c+IDA/FvK-1.07) with SMTP
  28.           id AA28123; Tue, 15 Mar 1994 15:27:41 -0500
  29. Received: from ms70.nuwes.sea06.navy.mil ([140.178.70.3]) by m65sun.nuwes.sea06.navy.mil with SMTP id AA29442
  30.   (5.65c/IDA-1.4.4 for winsock@sunsite.unc.edu); Tue, 15 Mar 1994 09:32:47 -0800
  31. Received: by ms70.nuwes.sea06.navy.mil with Microsoft Mail
  32.     id <2D861A1F@ms70.nuwes.sea06.navy.mil>; Tue, 15 Mar 94 12:27:11 PST
  33. From: West Mark                5741 <MarkW@ms70.nuwes.sea06.navy.mil>
  34. To: 'winsock' <winsock@sunsite.unc.edu>
  35. Subject: FW: How to complie?
  36. Date: Tue, 15 Mar 94 12:18:00 PST
  37. Message-Id: <2D861A1F@ms70.nuwes.sea06.navy.mil>
  38. Encoding: 90 TEXT
  39. X-Mailer: Microsoft Mail V3.0
  40.  
  41.  
  42.  
  43.  ----------
  44. From: West Mark                5741
  45. To: Winsock News
  46. Subject: RE: How to complie?
  47. Date: Friday, March 11, 1994 7:03AM
  48.  
  49.   The C++ mangles function names in order to provide function overloading, 
  50. mangling is a process whereby codes representing function arguments are 
  51. appended to the function name itself. These mangled names are then the names 
  52. of entry points, and also the names of external points the linker expects to 
  53. find.
  54.  
  55.   If you are linking C++ source to C libraries then you must predeclare 
  56. those functions as 'extern "C"', look it up, this prevents mangling. The 
  57. winsock header has a conditional compiler directive that does this for you. 
  58. If you '#define _cplusplus' before '#include <winsock.h>' the winsock 
  59. functions should be wrapped in "C", (i.e the linker should work), this 
  60. should work, but it did'nt work for me,  I found a more exotic but more 
  61. usefull method that links at runtime.
  62.  
  63.   If you are linking C source to C libraries you need to properly set  the 
  64. following linking options in BC++, 'case sensitive linking', 'case sensitive 
  65. externals', and the compiler option 'generates underscores', however I have 
  66. found that some libraries (especially BC++ libraries) require settings 
  67. contrary to what other  libraries (especially winsock) expect and you may 
  68. need to resort to a more exotic method.
  69.  
  70. Here is my method (in C++), it resovles points of entry at run time.
  71.  
  72. /* define a function pointer for each function in winsock.h */
  73.  
  74. SOCKET PASCAL FAR (FAR *lpfnSocket) (int af, int type, int protocol);
  75.  
  76. /* find and dereference the winsock Dll */
  77.  
  78.      HINSTANCE WinsockInstance = LoadLibrary((LPCSTR)"winsock.dll");
  79.  
  80.      if (WinsockInstance < HINSTANCE_ERROR)
  81.        {
  82.         OutputDebugString("\n\r winsock.dll HINSTANCE_ERROR" );
  83.         return(-1);
  84.        }
  85.  
  86. /* for each function, get the entry point */
  87.  
  88.      (FARPROC)lpfnSocket = GetProcAddress( WinsockInstance(LPCSTR)"socket" 
  89. );
  90.  
  91.      if( lpfnSocket == NULL )
  92.        {
  93.         OutputDebugString("\n\r socket GetProcAddress ERROR" );
  94.         return(-1);
  95.        }
  96.  
  97. /* now use the function pointer like this */
  98.  
  99.      sock = (*lpfnSocket)( AF_INET, SOCK_STREAM, 0 );
  100.  
  101.      if( sock == INVALID_SOCKET )
  102.        {
  103.         OutputDebugString("\n\r *** Socket not created");
  104.         return;
  105.        }
  106.      else
  107.        {
  108.         wsprintf( buffer, "\n\r socket %i created", (int)sock );
  109.         OutputDebugString( buffer );
  110.        }
  111.  
  112. If you need more info, post here or write : markw@ms70.nuwes.sea06.navy.mil
  113. Hope this helps.
  114.  
  115.  -Mark West
  116.  
  117.  
  118.  ----------
  119. From: winsock
  120. To: Multiple recipients of list
  121. Subject: How to complie?
  122. Date: Thursday, March 10, 1994 4:59AM
  123.  
  124. I get a program named ws_ftp. Their are winsock.lib whose length is 1024.
  125. I load ws_ping.prj in Borlnd C++ 4.0. Compling is sucessful. But linking
  126. failed. Why? How to link winsock.lib or winsock.dll? It shows socket,sento,
  127. ,etc are undefined symbol.
  128.  
  129. Thanks.
  130.  
  131.